const path = require('path');
module.exports = (params) => {
	var designWidth;
	let viewModule = process.env.VUE_APP_VIEW_MODULE;
	if (params.file.includes(path.join('node_modules', 'vant'))) {
		designWidth = 370
	} else if (params.file.includes(path.join('node_modules', 'element-ui'))) {
		designWidth = 555
	} else if (params.file.includes(path.join('views'))) {
		designWidth = 400
		// return {}
	}
	return {
		plugins: {
			autoprefixer: {},
			"postcss-px-to-viewport": {
				unitToConvert: "px",
				viewportWidth: designWidth,
				unitPrecision: 6,
				propList: ["*"],
				viewportUnit: "vw",
				fontViewportUnit: "vw",
				selectorBlackList: ['.slip-print-template'],
				minPixelValue: 1,
				mediaQuery: true,
				exclude: [],
				landscape: false
			}
		}
	}

}